﻿using battlenet.wow.rt.domain.objects;
using battlenet.wow.rt.sdk.data.dto;
using battlenet.wow.rt.sdk.utility;

namespace battlenet.wow.rt.sdk.objects.mapper
{
    internal class SpellMapper : Remapper<Spell>
    {
        public override void RegisterMappers()
        {
            Register(typeof(SpellInfo), input => Map(input as SpellInfo));
        }

        internal Spell Map(SpellInfo info)
        {
            var spell = new Spell
            {
                Id = info.Id,
                Name = info.Name,
                Description = info.Description,
                Icon = info.Icon,
                CastTime = info.CastTime
            };
            return spell;
        }
    }
}